#!/usr/bin/env python
# -*- coding=utf8 -*-
"""
# Author: bighu
# Created Time : 2022年03月19日 星期六 11时20分34秒
# File Name: 2.py
# Description:
"""
inputn=input()
inputnN = inputn.split(" ")
n,Nb=int(inputnN[0]),int(inputnN[1])
inputdata = input()
inputlist = inputdata.split(" ")
data = []
for i in  inputlist:
    data.append(int(i))
data = [0]+data
data = data+[Nb]
r=int(Nb/(n+1))
ans=0
numf=0
for i in range(Nb):
    if(numf<len(data)-2 and data[numf+1]==i):
        numf+=1

    tempg=int(i/r)
    if tempg>numf:
        ans+=tempg-numf
    else:
        ans+=numf-tempg

print(ans)

